/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PnlProDestitute.java
 *
 * Created on 20 ม.ค. 2553, 16:08:37
 */

package warehouse;

/**
 *
 * @author Administrator
 */
public class PnlProDestitute extends javax.swing.JPanel {

    /** Creates new form PnlProDestitute */
    public PnlProDestitute() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlHeadProDe = new javax.swing.JPanel();
        lblHeadProDes = new javax.swing.JLabel();
        btnProDeSearch = new javax.swing.JButton();
        btnProDeCancel = new javax.swing.JButton();
        btnProDeAddPro = new javax.swing.JButton();
        btnProDesPrint = new javax.swing.JButton();
        pnlProDe = new javax.swing.JPanel();
        cmbTypeCode = new javax.swing.JComboBox();
        lblTypePro = new javax.swing.JLabel();
        txtProPrice = new javax.swing.JTextField();
        lblProPrice = new javax.swing.JLabel();
        lblProUnit = new javax.swing.JLabel();
        txtProUnit = new javax.swing.JTextField();
        txtProDeBa = new javax.swing.JTextField();
        lblProDeBa = new javax.swing.JLabel();
        lblProCode = new javax.swing.JLabel();
        txtProCode = new javax.swing.JTextField();
        txtProName = new javax.swing.JTextField();
        lblProName = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblProDetitute = new javax.swing.JTable();
        lblProDeBa1 = new javax.swing.JLabel();
        txtProDeBa1 = new javax.swing.JTextField();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));
        setLayout(new java.awt.BorderLayout());

        pnlHeadProDe.setBackground(new java.awt.Color(204, 255, 204));
        pnlHeadProDe.setMaximumSize(new java.awt.Dimension(700, 80));
        pnlHeadProDe.setMinimumSize(new java.awt.Dimension(700, 80));
        pnlHeadProDe.setPreferredSize(new java.awt.Dimension(700, 80));

        lblHeadProDes.setFont(new java.awt.Font("Tahoma", 1, 16));
        lblHeadProDes.setText("รายการสินค้าหมด");

        btnProDeSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/search_30x30.gif"))); // NOI18N

        btnProDeCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/cancel_30x30.gif"))); // NOI18N

        btnProDeAddPro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/addTable_30x30.gif"))); // NOI18N

        btnProDesPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/print_30x30.gif"))); // NOI18N
        btnProDesPrint.setMaximumSize(new java.awt.Dimension(40, 40));
        btnProDesPrint.setMinimumSize(new java.awt.Dimension(40, 40));
        btnProDesPrint.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout pnlHeadProDeLayout = new javax.swing.GroupLayout(pnlHeadProDe);
        pnlHeadProDe.setLayout(pnlHeadProDeLayout);
        pnlHeadProDeLayout.setHorizontalGroup(
            pnlHeadProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadProDeLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlHeadProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlHeadProDeLayout.createSequentialGroup()
                        .addComponent(btnProDeSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnProDeCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnProDeAddPro, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnProDesPrint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblHeadProDes))
                .addContainerGap(490, Short.MAX_VALUE))
        );
        pnlHeadProDeLayout.setVerticalGroup(
            pnlHeadProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadProDeLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(lblHeadProDes)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlHeadProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(btnProDesPrint, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnProDeSearch, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                    .addComponent(btnProDeCancel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                    .addComponent(btnProDeAddPro, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        add(pnlHeadProDe, java.awt.BorderLayout.PAGE_START);

        cmbTypeCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblTypePro.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblTypePro.setText("ประเภทสินค้า :");

        txtProPrice.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblProPrice.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProPrice.setText("ราคา/หน่วย :");

        lblProUnit.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProUnit.setText("หน่วย :");

        txtProUnit.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtProDeBa.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtProDeBa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtProDeBaActionPerformed(evt);
            }
        });

        lblProDeBa.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProDeBa.setText("จำนวนสินค้าคงเหลือ :");

        lblProCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProCode.setText("รหัสสินค้า :");

        txtProCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtProName.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblProName.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProName.setText("ชื่อสินค้า :");

        tblProDetitute.setFont(new java.awt.Font("Tahoma", 0, 12));
        tblProDetitute.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "ประเภทสินค้า", "รหัสสินค้า", "รายการสินค้า", "ราคา/หน่วย", "หน่วย", "จำนวนคงเหลือ"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblProDetitute);

        lblProDeBa1.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProDeBa1.setText("จำนวนสินค้าที่ต้องการ :");

        txtProDeBa1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtProDeBa1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtProDeBa1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlProDeLayout = new javax.swing.GroupLayout(pnlProDe);
        pnlProDe.setLayout(pnlProDeLayout);
        pnlProDeLayout.setHorizontalGroup(
            pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlProDeLayout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlProDeLayout.createSequentialGroup()
                        .addGap(11, 11, 11)
                        .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblProDeBa1, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblProUnit, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblProName, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblTypePro, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtProDeBa1)
                            .addComponent(txtProUnit)
                            .addComponent(txtProName)
                            .addComponent(cmbTypeCode, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblProCode)
                            .addComponent(lblProPrice)
                            .addComponent(lblProDeBa))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtProDeBa)
                            .addComponent(txtProCode)
                            .addComponent(txtProPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 681, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlProDeLayout.setVerticalGroup(
            pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlProDeLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlProDeLayout.createSequentialGroup()
                        .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlProDeLayout.createSequentialGroup()
                                .addGap(27, 27, 27)
                                .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(txtProName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblProName)))
                            .addGroup(pnlProDeLayout.createSequentialGroup()
                                .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(cmbTypeCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblTypePro))
                                .addGap(33, 33, 33)
                                .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(txtProUnit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblProUnit, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblProDeBa1)
                            .addComponent(txtProDeBa1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlProDeLayout.createSequentialGroup()
                        .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtProCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblProCode, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlProDeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtProPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblProPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtProDeBa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlProDeLayout.createSequentialGroup()
                        .addGap(54, 54, 54)
                        .addComponent(lblProDeBa)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(173, Short.MAX_VALUE))
        );

        add(pnlProDe, java.awt.BorderLayout.LINE_END);
    }// </editor-fold>//GEN-END:initComponents

    private void txtProDeBaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtProDeBaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtProDeBaActionPerformed

    private void txtProDeBa1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtProDeBa1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtProDeBa1ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnProDeAddPro;
    private javax.swing.JButton btnProDeCancel;
    private javax.swing.JButton btnProDeSearch;
    private javax.swing.JButton btnProDesPrint;
    private javax.swing.JComboBox cmbTypeCode;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblHeadProDes;
    private javax.swing.JLabel lblProCode;
    private javax.swing.JLabel lblProDeBa;
    private javax.swing.JLabel lblProDeBa1;
    private javax.swing.JLabel lblProName;
    private javax.swing.JLabel lblProPrice;
    private javax.swing.JLabel lblProUnit;
    private javax.swing.JLabel lblTypePro;
    private javax.swing.JPanel pnlHeadProDe;
    private javax.swing.JPanel pnlProDe;
    private javax.swing.JTable tblProDetitute;
    private javax.swing.JTextField txtProCode;
    private javax.swing.JTextField txtProDeBa;
    private javax.swing.JTextField txtProDeBa1;
    private javax.swing.JTextField txtProName;
    private javax.swing.JTextField txtProPrice;
    private javax.swing.JTextField txtProUnit;
    // End of variables declaration//GEN-END:variables

}
